#include "CurrentDayDelegate.h"

#ifdef __QT5_TARGET

#include <QtCore/QPoint>
#include <QtGui/QColor>
#include <QtGui/QPainter>
#include <QtGui/QPen>

#else

#include <QPen>
#include <QColor>
#include <QPoint>

#endif

CurrentDayDelegate::CurrentDayDelegate(QObject *parent):QStyledItemDelegate(parent)
{
}

CurrentDayDelegate::~CurrentDayDelegate(void)
{
}


void CurrentDayDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
	QStyledItemDelegate::paint(painter,option,index);
	QPen pen;
	pen.setColor(Qt::red);
	pen.setWidth(2);
	painter->setPen(pen);
	QPoint* point = new QPoint[4];
	point[0] = option.rect.topLeft();
	point[1] = option.rect.bottomLeft();
	point[2] = option.rect.topRight();
	point[3] = option.rect.bottomRight();

	painter->drawLines(point,2);
}